package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;
//政策表
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_policy")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PolicyModel {
    @TableId(type = IdType.AUTO)
    private Integer id;//政策表ID
    private String title;//标题
    private String content;//内容
    private String coverImage;//封面图
    private Integer type;//分类ID
    private Integer userType;//用户类型 1 个人 2 企业

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp updateTime;
    @TableField(exist = false)
    private Integer limit;
    @TableField(exist = false)
    private Integer page;
    @TableField(exist = false)
    private String keyWord;
    @TableField(exist = false)
    private String startTime;
    @TableField(exist = false)
    private String endTime;

    @TableField(exist = false)
    private String typeText;
    @TableField(exist = false)
    private String userTypeText;//用户类型 1 个人 2 企业

}
